<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <!-- <link rel="stylesheet" href="/src/App.css"> -->
    <title>Mini Vite + React</title>
  </head>
  <body>
    <div id="root"></div>
    <script type="module" src="/src/main.js"></script>
  </body>
  <script>
    const ws = new WebSocket("ws://localhost:3001");
    ws.onmessage = (event) => {
      const message = JSON.parse(event.data);
      if (message.type === "reload") {
        location.reload(); // 简单地刷新页面
      }
    };
  </script>
</html>
